<%@ page import="java.util.Date" %>
<%@ page import="com.ydgk.bean.Admin" %>
<%@ page import="com.ydgk.dao.AdminDao" %>
<%@ page import="com.ydgk.dao.BookDao" %>
<%@ page import="com.ydgk.dao.SupplierDao" %><%--
  Created by IntelliJ IDEA.
  User: zzz
  Date: 2019/10/5
  Time: 15:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>home</title>
    <link rel="stylesheet" type="text/css" href="css/home.css">
</head>
<body>
<%
    Date d = new Date();
    int h = d.getHours();
    String s="";
    if(h>=5&&h<8){
        s = "早上好！";
    }else if(h>=8&&h<11){
        s = "上午好！";
    }else if(h>=11&&h<13){
        s = "中午好！";
    }else if(h>=13&&h<18){
        s = "下午好！";
    }else if(h>=18||h<5){
        s = "晚上好！";
    }

    BookDao bookDao = new BookDao();
    AdminDao adminDao = new AdminDao();
    SupplierDao supplierDao = new SupplierDao();
    int bookNumber = bookDao.findAllNumber();
    int adminNumber = adminDao.findAllNumber();
    int supplierNumber = supplierDao.findAllNumber();
%>
<div>
    <p>亲爱的<font><%= request.getParameter("aname")%></font>,<%= s%><br> <br>
        &nbsp;&nbsp;欢迎使用该图书管理系统,该系统目前共有图书种类<font><%= bookNumber%></font>种,供应商<font><%= supplierNumber%></font>个,管理员<font><%= adminNumber%></font>名，若需要管理图书请点击左边的<font>图书信息管理</font>ヾ(ﾟ∀ﾟゞ)。</p>
    <p align="right">——By Fang _(:3」∠❀)_</p>
</div>
</body>
</html>
